// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import axios from 'axios'//引入axios
import ECharts from 'vue-echarts'
import "echarts";
/*import {get,} from './utils/axios'*/
import store from './store/index'


Vue.prototype.$axios = axios;//把axios挂载到vue上
/*Vue.prototype.$get = get // http.get*/

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.component('ECharts',ECharts)

/* eslint-disable no-new */


new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  render: h => h(App),
  template: '<App/>'
})

/*
axios.interceptors.request.use(
  config =>{
    let token = localStorage.getItem('token')
    if(token){
      //这里面获取的请求头的键(tokenHeader)根据每个后端的习惯封装的名称各不相同
      config.headers.accessToken = token
    }
    return config
  }, error =>{
    return Promise.reject(error)
  }
)
*/
